home *** CD-ROM | disk | FTP | other *** search
/ Libris Britannia 4 / science library(b).zip / science library(b) / ASTRNOMY / EPHEM421.ZIP / VERSION.C < prev    next >
C/C++ Source or Header  |  1990-09-13  |  10KB  |  185 lines

  1. /* N.B. please increment version and date and note each change. */
  2.  
  3. #include "screen.h"
  4.  
  5. static char vmsg[] = "Version 4.21 August 23, 1990";
  6.  
  7. /*
  8.  * 4.21    8/23/90    fix dawn/dusk near vernal equinox.
  9.  * 4.20 8/15/90    add g/k and H/G magnitude model options for elliptical objects.
  10.  *    8/17    put moon's geocentric long/lat under Hlong/Hlat columns.
  11.  *        allow entering negative decimal years.
  12.  *    8/20    init all static mjd storage to unlike times.
  13.  *    8/21    add USE_TERMIO option to io.c.
  14.  * 4.19 8/7/90    add listing feature, with 'L' hot-key.
  15.  *        add title for plot file (as well as listing file).
  16.  *        add some (void) casts for lint sake.
  17.  * 4.18 8/2/90    fix parabolic comet bug in objx.c (bad lam computation).
  18.  * 4.17 7/2/90    add 'c' short cut to Menu field.
  19.  *        display full Dec precision for fixed objx setup.
  20.  *        increase pluto auscale in watch.c, and guard screen boundries.
  21.  *        add Pause feature.
  22.  *    7/27    further improve rise/set and dawn/dusk times.
  23.  *        add MENU={DATA,RISET,SEP} config/arg option.
  24.  * 4.16 5/30/90    watch popup now allows changing formats without returning.
  25.  *        add 'w' short cut to watch field.
  26.  *        improve labeling a bit in Dome display.
  27.  * 4.15    5/2/90    move setjmp() in main so it catches fp errs from ephem.cfg too.
  28.  *    5/15    maintain name of objx/y.
  29.  *        clean up objx.c.
  30.  *    5/16    fix bug circum.c related to phase of fixed objects.
  31.  *    5/22    add "Sky dome" watch display format (idea from Jeffery Cook).
  32.  *    5/23    remember last selection in watch, search, and plot popup menus.
  33.  *        cleanup layout and add labels in the watch screens.
  34.  * 4.14 4/9/90    add y to body_tags[] in watch.c.
  35.  *    4/10    add ! support (#ifdef BANG in sel_fld()).
  36.  *      4/17    add #ifdef VMS and allow for no time zones (Karsten Spang).
  37.  *    4/23    switch to EPHEMCFG (no more HOME).
  38.  *        add #include <stdlib.h> #ifdef VMS wherever atof() is used.
  39.  *    4/24    fix phase so it works for objects out of the ecliptic.
  40.  * 4.13 3/9/90    add support for second user-def object: "object y"
  41.  *        fix bug updating obj ref epoch (always used PARABOLIC's)
  42.  *        fix Turbo C workaround that prevented plotting sun dist.
  43.  *      3/13    fix bug preventing searching on separation column for objx
  44.  *    3/22    revamp elliptical object definition parameters to match AA.
  45.  *        permit exiting/redrawing properly from within a popup too.
  46.  *        add a bit more precision to plot labels.
  47.  *        let plot files have comments too, ie, leading *'s
  48.  *    3/23    add "Lookup" to search config file for objects.
  49.  *    3/30    separate database from config file; add -d and EPHEMDB env var.
  50.  *        catch SIGFPE and longjmp() back into main interation loop.
  51.  *    4/3    add magnitude to fixed-object database fields.
  52.  * 4.12 1/12/90    lay framework for orbital element support for object x.
  53.  *    1/15    fix slight bug related to nutation.
  54.  *        plot fields in the same order they were selected.
  55.  *    1/18       add copywrite notice in main.c.
  56.  *        note <sys/time.h> in time.c for BSD 4.3.
  57.  *    1/20    work on fixed and parabolic orbital elements.
  58.  *      1/25    work on elliptical orbital elements.
  59.  *    2/1    work on objx's magnitude models.
  60.  *        add confirmation question before quitting.
  61.  *      2/6    add d,o,z special speed move chars.
  62.  *    2/8    watch: add LST to night sky and maintain RTC time back in main.
  63.  *    2/12    fix bug in timezone related to daytime flag.
  64.  *        add w (week) watch advance key code.
  65.  *        add cautionary note about no string[s].h to Readme
  66.  *    2/15    allow for precession moving dec outside range -90..90.
  67.  *    2/19    fix bug that wiggled cursor during plotting in rise/set menu.
  68.  *    2/20    fix bug preventing DAWN/DUSK/LON from being used in search func.
  69.  * 4.11 12/29    add PC_GRAPHICS option in mainmenu.c (no effect on unix version)
  70.  *      1/3/90    fix twilight error when sun never gets as low as -18 degs.
  71.  *      1/4/90    always find alt/az from eod ra/dec, not from precessed values.
  72.  *    1/9/90    lastmjd in plans.c was an int: prevented needless recalcs.
  73.  * 4.10 12/6/89 fix transit times of circumpolar objects that don't rise.
  74.  *              fix plotting search function when searching is not on.
  75.  *    12/12    fix Objx rise/set bug.
  76.  *      12/21    don't erase last watch positions until computed all new ones.
  77.  *      12/23   added USE_BIOSCALLS to io.c: Doug McDonald's BIOS calls
  78.  *    12/27    allow dates to be entered as decimal years (for help with plots)
  79.  *    12/27    remove literal ESC chars in strings in io.c.
  80.  * 4.9 11/28/89 provide two forms of non-blocking reads for unix in io.c
  81.  *     11/30/89 take out superfluous ESC testing in chk_arrow().
  82.  *              guard better against bogus chars in sel_fld().
  83.  *        use %lf in scanf's.
  84.  *              command-line arg PROPTS+ adds to settings from config file.
  85.  *        change (int) casts in moduloes to (long) for 16bit int systems.
  86.  * 4.8 10/28/89 use doubles everywhere
  87.  *     10/31/89    add direct planet row selection codes.
  88.  *     11/2/89  improve compiler's fieldname parser.
  89.  *     11/3/89    switch from ESC to q for "go on" (CBREAK ESC not very portable)
  90.  *     11/6/89    allow plotting the search function too.
  91.  *     11/8/89  suppress screen updates while plotting and nstep > 1.
  92.  *     11/9/89    fix bug prohibiting plotting venus' sdist and objx's transit.
  93.  *     11/9/89    add option to plot in polar coords.
  94.  *     11/12/89    fix bug related to updating timezone name when it is changed.
  95.  *     11/21/89 fix bug in when to print info about object-x
  96.  *     11/21/89    increase MAXPLTLINES to 10 (to ease plotting all planet seps)
  97.  *     11/22/89 allow setting fields from command line too.
  98.  * 4.7 10/13/89 start adding general searching feature. start with flogging.
  99.  *     10/17/89 add compiler, first menu ideas, get binary srch working.
  100.  *     10/18/89 add parabolic-extrema and secant-0 solvers.
  101.  *     10/23/89 finish up new idea of one-line control and set-up "popup" menus.
  102.  * 4.6 10/29/89 improve transit circumstances by iterating as with rise/set.
  103.  *        allow changing lst.
  104.  *        show Updating message at better times.
  105.  *        avoid overstrikes while watching and add trails option.
  106.  *        allow for Turbo-C 2.0 printf bug using %?.0f".
  107.  * 4.5  9/24/89 add third table of all mutual planet angular distances.
  108.  * 4.4  9/21/89 add second planet table with rise/set times.
  109.  *        all rise/set times may now use standard or adaptive horizons.
  110.  * 4.3   9/6/89 NM/FM calendar overstikes now use local time (was ut).
  111.  *        display elongation of object x.
  112.  *        better handling of typo when asking for refraction model.
  113.  * 4.2    7/24/89    specify 7 digits to plot file (not just default to 6)
  114.  * 4.1  7/18/89 use buffered output and fflush in read_char().
  115.  * 4.0   7/8/89    add simple sky and solarsystem plotting (and rearrange fields)
  116.  *        change mars' .cfg mnemonic from a to m.
  117.  *        clean up nstep/NEW CIR handling
  118.  *        quit adding our own .cfg suffixes, but...
  119.  *        add looking for $HOME/.ephemrc (Ronald Florence)
  120.  *        drop -b
  121.  *        no longer support SITE
  122.  * 3.17 6/15/89 misspelt temperature prompt; sun -/= bug. (Mike McCants)
  123.  *        change sun() to sunpos() for sake of Sun Microsystems.
  124.  * 3.16  6/9/89 allow JD to be set and plotted.
  125.  *        c_clear (LATTIC_C) should use J not j (Alex Pruss)
  126.  *        support SIGINT (Ronald Florence)
  127.  * 3.15  6/8/89 forget SIMPLETZ: now TZA and TZB.
  128.  * 3.14  6/6/89 add back borders but allow turning off via -b
  129.  * 3.13 5/26/89 fix Day/Nite picking loc bug.
  130.  * 3.12 5/25/89 add SIMPLETZ option to time.c for systems w/o tzset()
  131.  *        files; couldn't plot dayln or niteln.
  132.  * 3.11 5/16/89 local time prompt said utc; add NiteLn; check for bad plot
  133.  * 3.10 4/27/89 allow caps for moving cursor around too
  134.  * 3.9   4/5/89 discard leading termcap delay digits, for now
  135.  * 3.8   3/2/89 shorten displayed precision, add heliocentric lat/long
  136.  * 3.7  2/13/89 change to ^d to quit program.
  137.  * 3.6   2/7/89 try adding .cfg suffix if can't find config file
  138.  * 3.5   2/2/89 sunrise/set times based on actual sun size and pressure/temp
  139.  * 3.4  1/22/89 calendar and all rise/set times based on local date, not utc
  140.  * 3.3   1/6/89 add z to plot files (still don't plot it however)
  141.  * 3.2   1/3/89 if set date/time then time does not inc first step
  142.  * 3.1   1/1/89 user def. graph labels; nstep/stpsz control; genuine c_eol
  143.  * 3.0 12/31/88 add graphing; add version to credits.
  144.  * 2.7 12/30/88 add version to credits.
  145.  * 2.6 12/28/88 twilight defined as 18 rather than 15 degrees below horizon
  146.  * 2.5 12/26/88 remove trace capability; add screen shadowing: ^l.
  147.  * 2.4 10/31/88 add credits banner, -s turns it off; savings time fix.
  148.  * 2.3  9/23/88 exchange Altitude/Elevation titles (no code changes)
  149.  * 2.2  9/20/88 more caution in aaha_aux() guarding acos() arg range
  150.  * 2.1  9/14/88 moon phase always >= 0 to match planets convention
  151.  * 2.0  9/13/88 add version ^v option
  152.  */
  153.  
  154. version()
  155. {
  156.     f_msg (vmsg);
  157. }
  158.  
  159. static char *cre[] = {
  160. "Ephem - an interactive astronomical ephemeris program",
  161. vmsg,
  162. "",
  163. "Copyright (c) 1990 by Elwood Charles Downey",
  164. "",
  165. "Permission is granted to make and distribute copies of this program",
  166. "free of charge, provided the copyright notice and this permission",
  167. "notice are preserved on all copies.  All other rights reserved.",
  168. "",
  169. "Many formulas and tables are based, with permission, on material found in",
  170. "\"Astronomy with your Personal Computer\"",
  171. "by Dr. Peter Duffett-Smith, Cambridge University Press, (c) 1985",
  172. "",
  173. "type any key to continue..."
  174. };
  175. credits()
  176. {
  177.     int r = 6;    /* first row of credits message */
  178.     int l;
  179.  
  180.     c_erase();
  181.     for (l = 0; l < sizeof(cre)/sizeof(cre[0]); l++)
  182.         f_string (r++, (NC - strlen(cre[l]))/2, cre[l]);
  183.     (void) read_char();    /* wait for any char to continue */
  184. }
  185.